package com.ibeetl.admin.api.util;

import java.net.URLDecoder;
import java.net.URLEncoder;

public class UrlUtils {

    /**
     * 编码
     * @param url
     * @return
     */
    public static String URLEncoder(String url){
        try {
            return URLEncoder.encode(url,"UTF-8");
        }catch (Exception e){
            e.printStackTrace();
        }

        return null;
    }

    /**
     * 解码
     * @param url
     * @return
     */
    public static String URLDecoder(String url){
        try {
            return URLDecoder.decode(url,"UTF-8");
        }catch (Exception e){
            e.printStackTrace();
        }

        return null;
    }

}
